import fetch from 'common/src/utils/fetch';

/**
 * 查询本科生开课的课程
 * @param {*} data
 */
export function findUnderGraduateOpenCourse(data) {
    return fetch({
        url: '/api/arrangementservice/underGraduateCourse/findFilterUnderGraduateClass',
        method: 'post',
        data: data
    });
}

export function getReportStatus(key) {
    return fetch({
        url: '/api/arrangementservice/masterCourseManage/result/' + key,
        method: 'get'
    });
}

export function findClassHourConflict(data) {
    return fetch({
        url: '/api/arrangementservice/teachingClass/findClassHourConflict',
        method: 'post',
        data: data
    });
}

export function findClassHourConflictPre(data) {
    return fetch({
        url: '/api/arrangementservice/teachingClass/findClassHourConflictPre',
        method: 'post',
        data: data
    });
}

export function queryWorkProgress(calendar) {
    return fetch({
        url: `/api/arrangementservice/workProgress/page?calendarId=${calendar}`,
        method: 'get'
    });
}

export function findNoTaskEntered(calendar,faculty) {
    return fetch({
        url: `/api/arrangementservice/workProgress/findNoTaskEntered?calendarId=${calendar}&faculty=${faculty}`,
        method: 'get'
    });
}

export function findNotScheduledTasks(calendar,faculty) {
    return fetch({
        url: `/api/arrangementservice/workProgress/findNotScheduledTasks?calendarId=${calendar}&faculty=${faculty}`,
        method: 'get'
    });
}

/**
 * 获取本科教学情况
 */
export function getUndergraduateTeaching(data) {
    return fetch({
        url: '/api/arrangementservice/UndergraduateTeaching/getUndergraduateTeaching',
        method: 'post',
        data: data
    });
}

/**
 * 导出教师本科教学情况Excel
 */
export function exportExcel(data) {
    return fetch({
      url: '/api/arrangementservice/UndergraduateTeaching/exportExcel',
      method: 'post',
      data:data
    });
  }

/**
 * 导出教师本科教学情况Pdf
 */
export function exportPdf(data) {
    return fetch({
      url: '/api/arrangementservice/UndergraduateTeaching/exportPdf',
      method: 'post',
      data:data
    });
  }

/**
 * 导出
 * @param {*} params
 */
export function getStatus(key) {
  return fetch({
    url: '/api/arrangementservice/file/export/status/' + key,
    method: 'get'
  });
}
